package com.example.dict.utils;

public class URLUtils {
    public static String pingyinUrl = "http://v.juhe.cn/xhzd/querypy?key=";
    public static String bushouUrl = "http://v.juhe.cn/xhzd/querybs?key=";
    public static final String DICTKEY = "3209fbc29b081ae9508757a803eedfde";
    public static String wordUrl = "http://v.juhe.cn/xhzd/query?key=";

    public static final String CHENGYUKEY = "f5e2e365db85b5d215e0a227cbe3a827";
    public static String chengyuUrl = "http://v.juhe.cn/chengyu/query?key=";

    public static String getChengyuUrl(String word){
        String url = chengyuUrl + CHENGYUKEY + "&word=" + word;
        return url;
    }

    public static String getWordUrl(String word){
        String url = wordUrl + DICTKEY + "&word=" + word;
        return url;
    }

    public static String getPinyinUrl(String word,int page,int pagesize){
        String url = pingyinUrl + DICTKEY + "&word=" + word +"&page=" + page
                + "&pagesize=" + pagesize;
        return url;
    }

    public static String getBushouUrl(String bs,int page,int pagesize){
        String url = bushouUrl + DICTKEY + "&word=" + bs +"&page=" + page
                + "&pagesize=" + pagesize;
        return url;
    }
}
